/*
 * @Author: zlz5v5
 * @LastEditors: zlz
 * @Date: 2019-08-09 15:11:27
 * @LastEditTime: 2019-08-12 14:56:18
 * @Github: https://github.com/Arc-zlz/
 */
const shapeType = { triangle: 'Triangle' }

function getArea(shape, options) {
    let area = 0
    switch (shape) {
        case shapeType.triangle:
            area = 0.5 * options.width * options.height
            console.log(area)
            break
    }
    return area
}
getArea(shapeType.triangle, { width: 100, height: 100 })
